<?php

use yii\db\Migration;

/**
 * Class m190203_170135_create_cloun_on_job_info
 */
class m190203_170135_create_cloun_on_job_info extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('job_info', 'start_at', $this->integer());
        $this->addCommentOnColumn('job_info', 'start_at', "兼职开始时间");
        $this->addColumn('job_info', 'end_at', $this->integer());
        $this->addCommentOnColumn('job_info', 'end_at', "兼职结束时间");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        $this->dropColumn('job_info', 'start_at');
        $this->dropColumn('job_info', 'end_at');

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m190203_170135_create_cloun_on_job_info cannot be reverted.\n";

        return false;
    }
    */
}
